﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Factorial
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = string.Empty;
            while (input != "exit")
            {
                input = Console.ReadLine();
                int i = 0;
                int.TryParse(input, out i);
                long l = Factorial.Get(i);
                Console.WriteLine(l);
            }
        }
    }
}
